fix(update): refresh target before foreground prompts - #405
Conversation
🦋 Changeset detectedLatest commit: 54f18a8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7196f96d6f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
7196f96 to
b0c5067
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 54f18a8b65
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Related Issue
No linked issue; this fixes foreground update prompts showing a stale cached target version.
Problem
Startup preflight could read an older cached latest version, then refresh the cache in the background. When automatic background installs were not used and a foreground prompt or manual command was shown, the UI could display the cached version even though a newer version was available from the fresh check.
What changed
Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.Validation
pnpm exec vitest run apps/kimi-code/test/cli/update/preflight.test.tspnpm --filter @moonshot-ai/kimi-code run typecheckpnpm exec oxlint --type-aware apps/kimi-code/src/cli/update/preflight.ts apps/kimi-code/test/cli/update/preflight.test.tsgit diff --check